This invention relates to a memory unit such as a semiconductor-type memory unit usable in a microprocessor and other devices.
Generally, microprocessors include register files having a given number of registers. In cases where a microprocessor control program branches from a main routine to a subroutine, if the data values used in the main routine are left in the register file, a smaller number of the registers can be used in the subroutine since the total number of the registers is fixed. A conventional way of preventing such a drawback is to save the data values into another memory to increase the number of the registers usable in the subroutine.
Advanced register files having a register window structure have been proposed to increase the speed of operation of a microprocessor. Such a register file is divided into a plurality of windows corresponding to a main routine and subroutines of a microprocessor control program. Each time the microprocessor control program branches from the main routine to a subroutine or each time the program returns from a subroutine to the main routine, a change between the windows is executed. This window change removes the need of saving register data into a memory, so that a speed of operation of the microprocessor can be increased.
In an advanced register file having a register window structure, some registers are used in common by different windows, and data can be transferred between subroutines via the common registers. Each of memory cells in a common register have two different addresses. As will be explained later, the prior art register file of such a type has a problem in operation speed.